# Makefile for SelFile.

prefix = .

exec_prefix = $(prefix)
bindir = $(exec_prefix)
# this should be tweaked
libdir = $(srcdir)/../lib
datadir = $(prefix)/lib
mandir = $(prefix)/man
man6dir = $(mandir)/man6
infodir = $(prefix)/info
docdir = $(datadir)/doc

srcdir = .

SHELL = /bin/sh

INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

CC = cc

CFLAGS = -g

AR = ar

RANLIB = ranlib

# Ditto for X font libraries.
#XFONTPATH = /usr/local/X11/lib/fonts/misc

X11_LIB = -lXmu -lX11

XAW_LIB = -lXaw -lXt $(X11_LIB) -lXext -lm

# Override this in order to point at the Xpm include files.

XPM_INCLUDE_FLAGS =

# Override this in order to point at the Xpm library.

XPM_LIB = -lXpm

WITH_LIBS = 

# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments.

OBJ =	SelFile.o \
	Path.o \
	Dir.o \
	Draw.o

UNIX_CFLAGS = -DSELFILE -DHOME_ON_DEMAND

ALL_CFLAGS = $(CFLAGS) $(REQD_CFLAGS) $(UNIX_CFLAGS) -I$(srcdir) $(X11_INCLUDE_FLAGS)

.c.o:
	$(CC) -c $(ALL_CFLAGS) $<

# Do it all.

all:	libXgnu.a

libXgnu.a: $(OBJ)
	rm -f libXgnu.a
	$(AR) ru libXgnu.a $(OBJ)
	$(RANLIB) libXgnu.a

install: all install-only

install-only:

# Cleanliness support.

clean:
	rm -f *.o lint.out core

distclean: clean
	rm -f Makefile config.status

extraclean: distclean
	rm -f *~* .*~*

realclean: distclean

Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
	$(SHELL) config.status

# Dependencies.
